<template>
  <div>
    <h1>{{ msg }}</h1>
    <h1>{{ fromfather }}</h1>
    <button v-on:click="onClickMe">onClickMe!</button>
  </div>
</template>

<script>


export default {
  name:"componentA",
  data:function() {
    return {
      msg: 'bbhello'
    }
  },
  props:["fromfather"],
  methods:{
    onClickMe:function(){
      this.$emit("child-tell-me-something",this.msg);
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>
